package com.hp.ongoing.app.view.form.contract;

import java.awt.Color;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.LayoutManager;

import javax.swing.BorderFactory;
import javax.swing.BoxLayout;
import javax.swing.JPanel;
import javax.swing.border.Border;

import com.sun.org.apache.regexp.internal.recompile;

import sun.misc.Launcher;

public class PainelFactory extends JPanel{
	
	public PainelFactory(){
		super.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0));
		super.setBorder(BorderFactory.createLineBorder(Color.darkGray, 1));
		super.setMinimumSize(new Dimension(300, 30));
	}
	
	
	public PainelFactory(LayoutManager layout, Color color){		
		super.setLayout(layout);
		super.setBorder(BorderFactory.createLineBorder(color, 1));
	}
	
	
	public PainelFactory(LayoutManager layout, Border borda){
		super.setLayout(layout);
		super.setBorder(borda);
		
	}
	
	public PainelFactory(LayoutManager layout){		
		super.setLayout(layout);		
	}
	
	public static FlowLayout getFlowLayoutSemGap(){
		FlowLayout layout = new FlowLayout();
		layout.setVgap(0);
		return layout;
	}
	
	public static JPanel getPainelBoxLayout(){
		JPanel painel = new JPanel();
		painel.setLayout(new BoxLayout(painel, BoxLayout.Y_AXIS));
		return painel;
	}
	
	

}
